﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Power.Common
{
    //define meter struct
    public struct RealData_PMH630
    {
        public string meter_id;  //电表编码
        public float V_a;    //A相电压V1
        public float V_b;    //B相电压V2
        public float V_c;    //C相电压V3
        public float V_avg;   //相电压平均值
        public float U_ab;   //AB 线电压U12
        public float U_bc;   //BC 线电压U23
        public float U_ca;   //CA 线电压U31
        public float U_avg;  //线电压平均值
        public float I_a;    //A 线（相）电流I1
        public float I_b;    //B 线（相）电流I2
        public float I_c;    //C 线（相）电流I3
        public float I_avg;  //平均电流
        public float I_d;    //中线电流In
        public float P_a;     //A相有功功率
        public float P_b;     //B相有功功率
        public float  P_c;     //C相有功功率
        public float P_t;     //系统合相有功功率Pt
        public float Q_a;     //A相无功功率
        public float Q_b;     //B相无功功率
        public float Q_c;     //C相无功功率
        public float Q_t;         //系统合相无功功率Qt
        public float S_a;      //A相视在功率
        public float S_b;      //B相视在功率
        public float S_c;      //C相视在功率
        public float S_t;         //系统合相视在功率St
        public float PF_a;      //A相功率因数
        public float PF_b;      //B相功率因数
        public float PF_c;      //C相功率因数
        public float PF;         //系统合相功率因数PF
        public float F;          //频率
        public float Imp_A_H;    //有功imp 高16 位Ept1
        public float Imp_A_L;    //有功imp 低16 位Ept2
        public float Imp_R_H;    //无功imp 高16 位Eqt1
        public float Imp_R_L;    //无功imp 低16 位Eqt2
        public float Exp_A_H;    //有功exp 高16 位Ept1
        public float Exp_A_L;    //有功exp 低16 位Ept2
        public float Exp_R_H;    //无功exp 高16 位Eqt1
        public float Exp_R_L;    //无功exp 低16 位Eqt2
        public int Swith_Data;      //开关量输入Data_in
        public int Relay_Data;      //继电器输出状态Data_out_s
        public int Pt1_;            //一次侧电压Pt1’
        public int Pt2;             //二次侧电压Pt2
        public int Ct1;             //电流变比Ct1
    }
    public struct Param_EQ600
    {
        public int Ctn;         //N相CT一次侧值
        public long Pt1;         //一次侧电压Pt1
        public int Pt2;         //二次侧电压
        public int Ct1;         //CT一次侧值
    }
    public struct RealData_EQ600
    {
        public string meter_id;  //电表编码
        public float V_a;    //A相电压V1
        public float V_b;    //B相电压V2
        public float V_c;    //C相电压V3
        public float V_avg;   //相电压平均值
        public float U_ab;   //AB 线电压U12
        public float U_bc;   //BC 线电压U23
        public float U_ca;   //CA 线电压U31
        public float U_avg;  //线电压平均值
        public float I_a;    //A 线（相）电流I1
        public float I_b;    //B 线（相）电流I2
        public float I_c;    //C 线（相）电流I3
        public float I_avg;  //平均电流
        public float I_d;    //中线电流In
        public float P_a;     //A相有功功率
        public float P_b;     //B相有功功率
        public float P_c;     //C相有功功率
        public float P_t;     //系统合相有功功率Pt Psum
        public float Q_a;     //A相无功功率
        public float Q_b;     //B相无功功率
        public float Q_c;     //C相无功功率
        public float Q_t;         //系统合相无功功率Qt Qsum
        public float S_a;      //A相视在功率
        public float S_b;      //B相视在功率
        public float S_c;      //C相视在功率
        public float S_t;         //系统合相视在功率St
        public float PF_a;      //A相功率因数
        public float PF_b;      //B相功率因数
        public float PF_c;      //C相功率因数
        public float PF;         //系统合相功率因数PF
        public float F;          //频率
        public float U_unbl;       //电压不对称度U_unbl
        public float I_unbl;       //电流不对称度I_unbl 
        public int Load_type;      //负载性质
        public float P_dema;       //有功功率需量P_dema
        public float Q_dema;       //无功功率需量Q_dema
        public float S_dema;       //视功功率需量S_dema
        public int DI;             //DI 
        public int DO;             //DO
        public float Imp_A;    //有功电度imp 
        public float Exp_A;    //有功电度Exp
        public float Imp_R;    //感性无功电度imp        
        public float Exp_R;    //荣性无功电度exp
        public float Ep_total;     //总有功电度Ep_total
        public float Ep_net;       //净有功电度Ep_net
        public float Eq_total;      //总无功电度Eq_total
        public float Eq_net;         //净无功电度Eq_net   

        //parameter
        public int Ctn;         //N相CT一次侧值
        public long Pt1;         //一次侧电压Pt1
        public int Pt2;         //二次侧电压
        public int Ct1;         //CT一次侧值
    }
    public struct Temperature_Str
    {
        public string hd_id;  //HD id
        public string stat;   //状态
        public float t_a;     //A相温度
        public float t_b;     //B相温度
        public float t_c;     //C相温度
    }
    public struct Meter_Str
    {
        public string Com_Port;
        public string Meter_Data;
        public string Param_Data;
    }    
    public struct Read_Failed
    {
        public string Com_Port;
        public int Node;
    }
    public struct Meter_Comm_Error
    {
        public string meter_id;
        public int read_failed_count;
        public bool is_show;
    }
    public struct Meter_PHM630
    {
                  
    }
    public struct Meter_Simulator
    {

    }
}
